

from django.conf.urls import url

from users import views_user, views_structure
from django.urls import path

app_name = 'users'

urlpatterns = [
    # 用户增改删查操作
    path('user/', views_user.UserView.as_view(), name="user"),
    path('user/list', views_user.UserListView.as_view(), name="user-list"),
    path('user/detail', views_user.UserDetailView.as_view(), name="user-detail"),
    path('user/update', views_user.UserUpdataView.as_view(), name="user-update"),
    path('user/create', views_user.UserCreateView.as_view(), name="user-create"),
    path('user/delete', views_user.UserDeleteView.as_view(), name="user-delete"),
    path('user/enable', views_user.UserEnableView.as_view(), name="user-enable"),
    path('user/disable', views_user.UserDisableView.as_view(), name="user-disable"),
    path('user/adminpasswdchange', views_user.AdminPasswdChangeView.as_view(), name="user-adminpasswdchange"),

    # 组织架构的改删查操作
    path('structure/', views_structure.StructureView.as_view(), name="structure"),
    path('structure/list', views_structure.StructureListView.as_view(), name="structure-list"),
    path('structure/detail', views_structure.StructureDetailView.as_view(), name="structure-detail"),
    path('structure/delete', views_structure.StructureDeleteView.as_view(), name="structure-delete"),
    path('structure/add_user', views_structure.Structure2UserView.as_view(), name="structure-add_user"),
]
